import React, { Component } from 'react'
import { AtList, AtListItem } from "taro-ui"
import { View } from '@tarojs/components';
import {TimeThing} from './TimeThing'

class TimeThings extends Component {

  constructor(){
    super(...arguments)
    this.state = {
      data:this.props.data,
    }
  }

  render () {
    return (
      <View>
      {/* 提示信息 */}
      <AtListItem title='可预约时间段'
          extraText={'挂号费:'+this.props.fee+'元'}></AtListItem>
      {/* 时间段 */}
        <AtList>
          {this.state.data.map(
            (item) => {
              return(
                <TimeThing data={item} doctor_name={this.props.doctor_name} fee={this.props.fee}/>)}
          )}
        </AtList>
      </View>
    )
  }
}

export {TimeThings}